<template>
  <div class="app-container">

<el-input v-model="fund" placeholder="请输入fund APPcode" style="width:400px" /></el-input>
<el-button
          type="primary"
          @click="editFund"
          >确定</el-button>
<br/>
<br/>
<el-input v-model="certification" placeholder="请输入certification APPcode" style="width:400px" ></el-input>
<el-button
          type="primary"
          @click="editCertification"
          >确定</el-button>
<br/>
<br/>
<el-input v-model="gold" placeholder="请输入goldAPK APPcode" style="width:400px" ></el-input>
<el-button
          type="primary"
          @click="goldFunction"
          >确定</el-button >
          <br/>
          <br/>
<el-input v-model="port" placeholder="请输入后端ip和端口" style="width:400px" ></el-input>
<el-button
          type="primary"
          @click="editPort"
          >确定</el-button >
  </div>

  
</template>
<script>
import aboutShow from "@/api/setting";

export default {
  data() {
    return {   
      fund:null,
      certification:null,
      gold: null,
      port: null,
    };
  },
  created() {
    
  },
  watch: {
    
  },
  methods: {
    //修改fundAPPcode
      editFund() {
        aboutShow.updateFund(this.fund)
          .then((response) => {
            if(response.code==200){
            this.$message({
              type: "success",
              message: response.msg,
            });
            }else{
            this.$message({
              type: "success",
              message: response.msg,
            });
            }
            location.reload();
          });
        },

     editCertification() {
      aboutShow.updateCertification(this.certification).then((response) => {
        //修改成功
        //提示信息
        if(response.code==200){
         this.$message({
          type: "success",
          message: response.msg,
        });
        }else{
         this.$message({
          type: "success",
          message: response.msg,
        });
        }
        location.reload();
      });
    },
    goldFunction() {
      aboutShow.updateGoldFunction(this.gold).then((response) => {
        //修改成功
        //提示信息
        if(response.code==200){
         this.$message({
          type: "success",
          message: response.msg,
        });
        }else{
         this.$message({
          type: "success",
          message: response.msg,
        });
        }
        location.reload();
      });
    },
    editPort() {
      aboutShow.updatePort(this.port).then((response) => {
        //修改成功
        //提示信息
        if(response.code==200){
         this.$message({
          type: "success",
          message: response.msg,
        });
        }else{
         this.$message({
          type: "success",
          message: response.msg,
        });
        }
        location.reload();
      });
    },
  },
   
};
</script>
